import { post } from "@/utils/ajax";

// 新增组件
export function insertComp(params) {
  return post("/code/component/market/insert", params);
}

// 查询当前用户可使用组件列表
export function searchCompListByUser(query) {
  return post("/code/component/market/searchCodeComponentList", {
    ...query,
    isDelete: "N",
  });
}

// 修改组件信息
export function updateComp(params) {
  return post("/code/component/market/updateById", params);
}

// 查询所有组件
export function searchCompListByAll(query) {
  return post("/code/component/market/searchByEntity", {
    ...query,
    isDelete: "N",
  });
}
